<?php

for( $counter = 0; $counter < 7; $counter += 1){
	$week[]= date('D, M. j',mktime()+86400*$counter);
}

$calendarIndexer=0;
if(strcmp(substr($week[0],0,2),"Mo")==0){
	$calendarIndexer=6;
} else if(strcmp(substr($week[0],0,2),"Tu")==0){
	$calendarIndexer=5;
} else if(strcmp(substr($week[0],0,2),"We")==0){
	$calendarIndexer=4;
} else if(strcmp(substr($week[0],0,2),"Th")==0){
	$calendarIndexer=3;
} else if(strcmp(substr($week[0],0,2),"Fr")==0){
	$calendarIndexer=2;
} else if(strcmp(substr($week[0],0,2),"Sa")==0){
	$calendarIndexer=1;
}

for($a=0; $a<7; $a+=1){
	if($calendarIndexer+$a>6){
		$calendarIndex[]=($calendarIndexer+$a-7);
	} else {
		$calendarIndex[]=$calendarIndexer+$a;
	}
}

$c0 = $calendarIndex[0];
$c1 = $calendarIndex[1];
$c2 = $calendarIndex[2];
$c3 = $calendarIndex[3];
$c4 = $calendarIndex[4];
$c5 = $calendarIndex[5];
$c6 = $calendarIndex[6];

?>
